<?py if cur_user and int(cur_user['flag'])>=99: ?>
<div class="sider-box">
    <div class="sider-box-title">管理员（#{cur_user['flag']}）面板 <<a href="http://www.saespot.com/" target="_blank">支持社区</a>></div>
    <div class="sider-box-content">
    <span class="btn">
    <a href="/add-node">添加分类</a><a href="/set-user-flag">设置用户权限</a><a href="/edit-post">修改帖子</a><a href="/edit-comment">修改评论</a>
    </span>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'hot_node' in _context and hot_node and len(hot_node)==10: ?>
<div class="sider-box">
    <div class="sider-box-title">热点分类</div>
    <div class="sider-box-content">
    <span class="btn">
    <?py for k,name in hot_node: ?>
    <a href="/node/#{k}">#{name}</a>
    <?py #endfor ?>
    </span>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'newest_node' in _context and newest_node: ?>
<div class="sider-box">
    <div class="sider-box-title">最近添加的分类</div>
    <div class="sider-box-content">
    <span class="btn">
    <?py for k,name in newest_node: ?>
    <a href="/node/#{k}">#{name}</a>
    <?py #endfor ?>
    </span>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'recent_node' in _context and recent_node and len(recent_node)==10: ?>
<div class="sider-box">
    <div class="sider-box-title">大家正在看的分类</div>
    <div class="sider-box-content">
    <span class="btn">
    <?py for k,name in recent_node: ?>
    <a href="/topic/#{k}">#{name}</a>
    <?py #endfor ?>
    </span>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'recent_topic_objs' in _context and recent_topic_objs: ?>
<div class="sider-box">
    <div class="sider-box-title">最近发表</div>
    <div class="sider-box-content">
    <ul>
    <?py for k,tit in recent_topic_objs: ?>
    <li>&raquo; <a href="/topic/#{k}">#{tit}</a></li>
    <?py #endfor ?>
    </ul>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'comment_topic_objs' in _context and comment_topic_objs: ?>
<div class="sider-box">
    <div class="sider-box-title">刚被挖出来的</div>
    <div class="sider-box-content">
    <ul>
    <?py for k,tit in comment_topic_objs: ?>
    <li>&raquo; <a href="/topic/#{k}">#{tit}</a></li>
    <?py #endfor ?>
    </ul>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if LINK_BROLL: ?>
<div class="sider-box">
    <div class="sider-box-title">链接</div>
    <div class="sider-box-content">
    <span class="btn">
    <?py for link in LINK_BROLL: ?>
    <a href="#{link['url']}" title="${link['title']}" target="blank">#{link['text']}</a>
    <?py #endfor ?>
    </span>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>

<?py if 'site_counts' in _context and site_counts: ?>
<div class="sider-box">
    <div class="sider-box-title">站点运行信息</div>
    <div class="sider-box-content">
    <ul>
    <?py for k,v in site_counts: ?>
    <li>#{k}: #{v}</li>
    <?py #endfor ?>
    </ul>
    <div class="c"></div>
    </div>
</div>
<?py #endif ?>
